<?php

class Act_computer extends Doctrine_Record {

    public function setTableDefinition() {
        $this->hasColumn('act_id', 'integer', 20);
        $this->hasColumn('support_id', 'integer', 20);
        $this->hasColumn('company_gear_id', 'integer', 20);
        $this->hasColumn('problem', 'string', 1000);  // pakeista iš comment į problem
        $this->hasColumn('solution', 'string', 1000);
    } 
    public function setUp() {
        $this->actAs('Timestampable');
        $this->hasOne('Act', array(
            'local' => 'act_id',
            'foreign' => 'id',
            'onDelete' => 'CASCADE'
                )
        );
        $this->hasOne('Company_gear', array(
            'local' => 'company_gear_id',
            'foreign' => 'id',
            'onDelete' => 'CASCADE'
                )
        );
        $this->hasOne('Support', array(
            'local' => 'support_id',
            'foreign' => 'id',
            'onDelete' => 'CASCADE'
                )
        );
    }

}

